// 迭代器（Iterator）

// 在浏览器控制台


const set = new Set(['foo', 'bar', 'zom'])
const array = ['foo', 'bar', 'zom']
const iterator = set[Symbol.iterator]()
console.log(iterator.next()) // { value: 'foo', done: false }
console.log(iterator.next()) // { value: 'bar', done: false }
console.log(iterator.next()) // { value: 'zom', done: false }
console.log(iterator.next()) // { value: undefined, done: true }